package com.computergames.server;

import com.computergames.server.server.ComputerGamesServer;
import com.computergames.server.server.ComputerGamesServerImpl;
import com.computergames.server.util.SpringUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.kafka.core.KafkaTemplate;

@SpringBootApplication
//
public class CgcpApplication implements CommandLineRunner{
    public static void main(String[] args) {
        SpringApplication.run(CgcpApplication.class, args);
        //Server server1 = SpringUtil.getBean(Server.class);
        //server1.start();
    }

    @Override
    public void run(String... args) throws Exception {
        ComputerGamesServer server = new ComputerGamesServerImpl();
        server.start();
    }
}
